package cn.wolfcode.luowowo.mgrsite.controller;

import cn.wolfcode.luowowo.article.domain.StrategyCommend;
import cn.wolfcode.luowowo.article.domain.TravelCommend;
import cn.wolfcode.luowowo.article.service.IStrategyCommendService;
import cn.wolfcode.luowowo.article.service.ITravelCommendService;
import cn.wolfcode.luowowo.article.service.ITravelService;
import cn.wolfcode.luowowo.common.query.StrategyQueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("travelCommend")
public class TravelCommendController {

    @Reference
    private ITravelCommendService travelCommendService;
    //http://localhost:81/travelCommend/list
    @RequestMapping("list")
    public String list(@ModelAttribute("qo")StrategyQueryObject queryObject, Model model){
        PageInfo<TravelCommend> pageInfo = travelCommendService.query(queryObject);
        model.addAttribute("pageInfo",pageInfo);
        return "travelCommend/list";
    }
}
